import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import store from './store'
import Vuex from 'vuex'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import echart from 'echarts'
import router from './router'
import Mock from './api/api.js' // api.js文件
import axios from 'axios' // axios http请求库
import VueAxios from 'vue-axios'

// font-awesome.css..
import './assets/css/font-awesome.css'
// echart
import echarts from 'echarts'

Vue.use(ElementUI)
Vue.use(VueRouter)
Vue.use(axios, VueAxios)
Vue.use(Vuex)
Vue.use(Mock)
Vue.use(echarts)
// Vue.use(echart)
// Vue.prototype.$echarts = echarts

// axios.defaults.baseURL = 'https://api.example.com';
// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
axios.defaults.baseURL = 'http://mymockjs.com/api' // 设置默认请求的url
Vue.prototype.$http = axios
Vue.prototype.$echarts = echarts

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
